package com.joker.aigc.chat.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.joker.aigc.chat.domain.entity.GroupMember;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * @author 20346
 * @description 针对表【group_member(群成员表)】的数据库操作Mapper
 * @createDate 2023-12-17 11:26:08
 * @Entity com.joker.aigc.modules.chat.domain.entity.GroupMember
 */
@Mapper
public interface GroupMemberMapper extends MPJBaseMapper<GroupMember> {


    @Select("select gm.uid from room_group rg left join group_member gm on gm.group_id = rg.id where rg.room_id=#{roomId}")
    List<Long> selectUserIdByRoomId(@Param("roomId") Long roomId);


//    @Select("select rg.uid from room_group rg left join group_member gm on gm.group_id = rg.id " +
//            "where rg.room_id=#{roomId}")
//    List<GroupMemberVo> selectUserIdByRoomId(@Param("roomId") Long roomId);


}




